﻿using log4net.Config;
using log4net.Repository;
using log4net;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;

namespace SQLDataUploadHelper
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {
        public static ILoggerRepository LogRepository { get; set; }

        protected override void OnStartup(StartupEventArgs e)
        {
            LogRepository = LogManager.CreateRepository("NETCoreRepository");          //仓库的名字可以在配置文件中配置，也可以直接写死
            XmlConfigurator.Configure(LogRepository, new FileInfo(@"commons\configs\log4net.config"));  //读取配置文件
        }
    }
}
